<?php
    include_once("functions_bandwidth_ident.php");
    include_once("datefunctions.php");

    $Start = date("Y/m/") . "1 00:00:00";
    $Start = DateAdd("m", -1, $Start);
    $Start = date("Y/m/d", $Start) . ' 00:00:00' ;
    $Einde = date("Y/m/") . "1 00:00:00";
    $Einde = DateAdd("d", -1, $Einde);
    $Einde = date("Y/m/d", $Einde) . ' 23:59:59';
    $bw = func_bw_volume_ident_top10_periode($Start, $Einde);

print "<chart>";
print "<chart_type>pie</chart_type>";
print "<legend layout='hide' />";
print "<chart_data>
  <row>
	 <null/>
	 <string>" . $bw[0][0] . "</string>
	 <string>" . $bw[1][0] . "</string>
	 <string>" . $bw[2][0] . "</string>
	 <string>" . $bw[3][0] . "</string>
     <string>" . $bw[4][0] . "</string>
	 <string>" . $bw[5][0] . "</string>
	 <string>" . $bw[6][0] . "</string>
	 <string>" . $bw[7][0] . "</string>
     <string>" . $bw[8][0] . "</string>
     <string>" . $bw[9][0] . "</string>
  </row>
  <row>
	 <string>Region A</string>
	 <number>" . $bw[0][1] . "</number>
	 <number>" . $bw[1][1] . "</number>
	 <number>" . $bw[2][1] . "</number>
	 <number>" . $bw[3][1] . "</number>
     <number>" . $bw[4][1] . "</number>
	 <number>" . $bw[5][1] . "</number>
	 <number>" . $bw[6][1] . "</number>
	 <number>" . $bw[7][1] . "</number>
     <number>" . $bw[8][1] . "</number>
     <number>" . $bw[9][1] . "</number>
  </row>
</chart_data>";
print "</chart>";
?>
